<template>
  <div class="login-max-box">
    <van-nav-bar class="van-nav-bar" title="用户登录" left-text="首页" left-arrow @click-left="onClickLeft" />
      <!-- logo -->
    <div class="logo-box"><img src="../../../public/imgs/logo.png" alt="logo"></div>
      <!-- 登录页表单组件 -->
      <login-form/>
      <!-- 登录页脚部组件 -->
      <login-foot />
    </div>
</template>

<script  type='module'>
import LoginForm from './components/LoginForm'// 登录页表单组件
import LoginFoot from './components/LoginFoot'// 登录页脚部组件
export default {
  name: 'Login',
  data () {
    return {
      // 登录手机号
      username: '13378681755',
      // 登录密码
      password: 'ahj28685',
      // 登录成功返回的用户信息
      userInfo: []
    }
  },
  components: {
    LoginForm, // 登录表单部组件
    LoginFoot// 登录页脚部组件
  },
  methods: {
    // 返回首页
    onClickLeft () {
      this.$router.push('/')
    }
  }
}
</script>

<style scoped lang="less">
.login-max-box {
  // height: 100%;
  height: calc(100vh - 40px);
  position: relative;
  // background-color: #bd3126;
  .logo-box {
    width: 80px;
    height: 80px;
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}
</style>
